package com.zdy.im.conf;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 * @WeeK 星期: 星期二
 * @Version 版本: v1.0.0
 * <pre>
 *
 *  @Description (说明):  IM服务环境变量配置参数类
 *
 * </pre>
 **/
@Configuration
@ConfigurationProperties(prefix = ImServerConst.IM_SERVER_CONFIG)
@ConditionalOnWebApplication
@ConditionalOnProperty(name = ImServerConst.IM_SERVER_CONFIG_ENABLED, havingValue = "true", matchIfMissing = true)
public class ImServerSettings {

    private String ws="ws://127.0.0.1:9326";
    private String ossResize = "?x-oss-process=image/resize,w_160/quality,q_80";
    private String defHeadImg = "https://im-file.sixeco.com/im/202105/C23D958E45EF4915988A61F2828EA931.png";

    public String getWs() {
        return ws;
    }

    public void setWs(String ws) {
        this.ws = ws;
    }

    public String getOssResize() {
        return ossResize;
    }

    public void setOssResize(String ossResize) {
        this.ossResize = ossResize;
    }

    public String getDefHeadImg() {
        return defHeadImg;
    }

    public void setDefHeadImg(String defHeadImg) {
        this.defHeadImg = defHeadImg;
    }
}
